﻿using EPiServer;
using EPiServer.DynamicContent;

namespace SocialPack.modules.SocialPack.DynamicContent.Disqus
{
    [DynamicContentPlugIn(
        DisplayName = "Disqus Comment Count",
        Description = "Shows the number of comments",
        ViewUrl = "~/modules/socialpack/dynamiccontent/disqus/commentcount.ascx")]
    public partial class CommentCount : UserControlBase
    {
        public string DisqusShortName { get; set; }

        protected override void OnLoad(System.EventArgs e)
        {
            base.OnLoad(e);

            if (!string.IsNullOrWhiteSpace(this.DisqusShortName))
            {
                this.CommentCountControl.ShortName = this.DisqusShortName;
            }
        }
    }
}